/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.registration.core;

import com.registration.Persistent;

/**
 *
 * @author Usuario
 */
public class Hotel implements Persistent {
    private Long id;
    private String name;
    private String address;
    private String phone;
    private Integer rooms;
    private boolean host = false;

    public Hotel() {
    }

    public Hotel(String name, boolean host) {
        this.name = name;
        this.host = host;
    }        

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getRooms() {
        return rooms;
    }

    public void setRooms(Integer rooms) {
        this.rooms = rooms;
    }        

    public boolean isHost() {
        return host;
    }

    public void setHost(boolean host) {
        this.host = host;
    }     
        
    @Override
    public int hashCode() {
        return id.hashCode();
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if (!(other instanceof Hotel)) {
            return false;
        }
        Hotel _i = (Hotel) other;
        return id != null ? id.equals(_i.id) : false;
    }
}
